from functools import wraps

if __name__ == "__main__":
  print("Hello my utility!")


def logger(text):

  def inner(infunc):

    @wraps(infunc)
    def wrap(*arg, **kwarg):

      print(text, infunc.__name__ + str(arg) + str(kwarg), end=' | ', sep=' ')
      print(infunc(*arg, **kwarg))

    return wrap

  return inner


@logger("from Utils")
def qpow(base, exp, mod):
  res = 1
  while exp:
    if exp & 1:
      res *= base
      res %= mod
    base *= base
    base %= mod
    exp >>= 1
  return res
